﻿@model IEnumerable<Models.WorkflowInstance>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>
<span>流程名称: @ViewBag.workflowname</span>
<p>
    @Html.ActionLink("发起预跑", "start", new { workflowid = ViewBag.workflowid })
</p>

@Html.Hidden("workflowid",ViewBag.workflowid as String)
<table>
    <tr>
        <th>
            Workflow
        </th>
        <th>
            ApplyMsg
        </th>
        <th>
            Description
        </th>
        <th>
            Sequence
        </th>
        <th>
            User
        </th>
        <th>
            ModifiedTime
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Workflow.WorkflowName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ApplyMsg.Description)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Description)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Sequence)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.User)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ModifiedTime)
        </td>
        <td>
            @Html.ActionLink("审批", "Approve", new { id=item.ID }) |
            @Html.ActionLink("查看", "Details", new { id=item.ID }) |
            @Html.ActionLink("删除", "Delete", new { id=item.ID })
        </td>
    </tr>
}

</table>
